package com.nuonuo.refresh.controller;

import com.nuonuo.middleware.drs.client.annotation.DrsValue;
import com.nuonuo.middleware.drs.spring.context.annotation.DrsBeanRefresh;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author duan
 * @version 1.0
 * @date 2023/1/16 9:11
 */
@RestController
@RequestMapping(value = "refresh/drsValue")
@DrsBeanRefresh
public class RefreshByDrsValueController {

    @DrsValue("${app.name:test-client}")
    private String appName;

    @GetMapping(value = "getAppName")
    public String getAppName() {
        return this + ", " + appName;
    }
}
